// pages/product-issues/detail/index.js
// 获取应用实例
const app = getApp()
import {
    util,
    Toast,
    commonMixin
} from "../../../utils/util.js";
Page({
    behaviors: [commonMixin],
    data: {
        id:'',
        detail: {}
    },
    onLoad(options) {
        let id = options.id;
        wx.showLoading({
            title: '加载中',
          })
          util.http.post("v1/mini/question-get-detail",{
              id: id
          }).then((res) => {
              if (res.data.code == 0) {
                this.setData({
                    detail: res.data.data,
                })
              }
              wx.hideLoading();
          }).catch((err) => {
              wx.hideLoading();
              Toast('网络异常！刷新后重试！');
              console.log(err)
          })
    },
    onShow() {

    },
    //获取活动数据
    getData() {
        wx.showLoading({
            title: '加载中...',
            mask: true
        });
        let userInfo = util.getUserInfo();
        util.http.get("applet/activity", {
            id:this.data.id
        }).then((res) => {
            if (res.data.code == 0) {
              

            } else {
                Toast(res.data.message);
            }
            wx.hideLoading();
        }).catch((err) => {
            wx.hideLoading();
            Toast('网络异常！刷新后重试！');
            
        })
    },
    onShareAppMessage() {
     
    },
})